/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.materialMedia.constitutiveModel;

import java.util.HashMap;

import br.ufmg.dees.insane.analysisModel.AnalysisModel;
import br.ufmg.dees.insane.continuousPointModel.ContinuousPointModel;
import br.ufmg.dees.insane.materialMedia.material.Material;
import br.ufmg.dees.insane.util.IMatrix;
import br.ufmg.dees.insane.util.IVector;

/**
 *A class representing constitutiveModel.<p>
 *
 *@author CENOURA!!!
 *@version 1.0
 *@since 04/05/2005
 */
public interface ConstitutiveModel {

    /** Mounts the constitutive matrix for the non-informed internal variable.
    * @param am The analysis model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
	* @return The constitutive matrix for the non-informed internal variable.
	*/
    public abstract IMatrix mountC (AnalysisModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the constitutive matrix for the non-informed internal variable.
     * @param am The analysis model of the constitutiveModel owner.
     * @param mat The material of the constitutiveModel owner.
     * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
 	* @return The constitutive matrix for the non-informed internal variable.
 	*/
     public abstract IMatrix mountC (ContinuousPointModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the tangent constitutive matrix for the informed internal variable.
    * @param am The analysis model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
	* @return The tangent constitutive matrix for the informed internal variable.
	*/
    public abstract IMatrix mountCt (AnalysisModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the tangent constitutive matrix for the informed internal variable.
     * @param am The continuous point model of the constitutiveModel owner.
     * @param mat The material of the constitutiveModel owner.
     * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
 	* @return The tangent constitutive matrix for the informed internal variable.
 	*/
     public abstract IMatrix mountCt (ContinuousPointModel am, Material mat, HashMap<Object, Object> cv);
     
    /** Mounts the secant constitutive matrix for the informed internal variable.
	* @param am The analysis model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
	* @return The secant constitutive matrix for the informed internal variable.
	*/
    public abstract IMatrix mountCs (AnalysisModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the secant constitutive matrix for the informed internal variable.
	* @param am The continuous point model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner.
	* @return The secant constitutive matrix for the informed internal variable.
	*/
    public abstract IMatrix mountCs (ContinuousPointModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the matrix of the dual internal variable for the informed internal variable.
	* @param e A vector representing the material point internal variable.
	* @param am The analysis model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner. 
	* @return The matrix of the dual internal variable for the informed internal variable.
	*/
    public abstract IVector mountDualInternalVariableVector(IVector e, AnalysisModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Mounts the matrix of the dual internal variable for the informed internal variable.
	* @param e A vector representing the material point internal variable.
	* @param am The Continuous Point Model of the constitutiveModel owner.
    * @param mat The material of the constitutiveModel owner.
    * @param cv A HashMap with constitutive variables of the constitutiveModel owner. 
	* @return The matrix of the dual internal variable for the informed internal variable.
	*/
    public abstract IVector mountDualInternalVariableVector(IVector e, ContinuousPointModel am, Material mat, HashMap<Object, Object> cv);
    
    /** Checks the the AnalysisModel of the constitutiveModel owner.
     *@param am The AnalysisModel to check.
     */
    public abstract void check(AnalysisModel am) throws AnalysisModelNotValid;
    
    /** Checks the the ContinuousPointModel of the constitutiveModel owner.
     *@param am The ContinuousPointModel to check.
     */
    public abstract void check(ContinuousPointModel am) throws ContinuousPointModelNotValid;
    
    /** Checks the the material of the constitutiveModel owner.
     *@param am The material to check.
     */
    public abstract void check(Material mat) throws MaterialNotValid;
    
    /**Returns the label of this ConstitutiveModel.
     * @return Returns the label.
     */
    public abstract String getLabel();
    
    /** The constitutive model updates the state of its owner's variables. 
	*/
    public abstract void update(HashMap<Object, Object> previous, HashMap<Object, Object> vm);
    
    /**Inits the state of the constitutiveModel owner's variables map.*/
    public abstract void init(HashMap<Object, Object> previous, HashMap<Object, Object> cv, AnalysisModel am, Material mat);
    
    /**Inits the state of the constitutiveModel owner's variables map.*/
    public abstract void init(HashMap<Object, Object> previous, HashMap<Object, Object> cv, ContinuousPointModel am, Material mat);
    
    /**Returns the number of previous variables of this ConstitutiveModel.
     * @return Returns the number of previous variables.
     */
    public abstract int getNumberOfVariables();
    
    /**Returns the number of previous variables of this ConstitutiveModel.
     * @return Returns the number of previous variables.
     */
    public abstract int getNumberOfPreviousVariables();
    
}
